export default function (assetJson) {
    if (assetJson === null || 'object' !== typeof assetJson) {
        throw new Error('[asset-development] The parameter must be an object type.');
    }
    
    const cached = {};

    return function (arr) {
        arr = [].concat(arr);
        arr.push('style');

        const result = {
            js: [],
            css: [],
            compat: assetJson.compat
        };

        for (const name of arr) {
            Reflect.has(assetJson, name) && result.js.push('/' + assetJson[name]);
        }

        return result;
    }
}